package com.bskj.common.enums;

public enum YesOrNoEnum {
	No(0, "否"), Yes(1, "是");

	private int key;
	private String value;

	private YesOrNoEnum(int key, String value) {
		this.key = key;
		this.value = value;
	}

	public int getKey() {
		return key;
	}

	public void setKey(int key) {
		this.key = key;
	}

	public String getValue() {
		return value;
	}

	public void setValue(String value) {
		this.value = value;
	}
	
	public static YesOrNoEnum get(int key) {
		for(YesOrNoEnum yesOrNoEnum : YesOrNoEnum.values()) {
			if(yesOrNoEnum.getKey() == key) {
				return yesOrNoEnum;
			}
		}
		return null;
	}
}
